package com.hotelManagerSystem.service.impl;

import com.hotelManagerSystem.model.Room;
import com.hotelManagerSystem.mapper.RoomMapper;
import com.hotelManagerSystem.service.IRoomService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author Cynthia
 * @since 2021-12-22
 */
@Service
@Primary
public class RoomServiceImpl extends ServiceImpl<RoomMapper, Room> implements IRoomService {
    @Autowired
    RoomMapper roomMapper;
    @Override
    public int updateStateById(Integer roomId, int roomCleanState) {
        return roomMapper.updateStateById(roomId,roomCleanState);
    }

    @Override
    public int updateStateByIdClean(Integer roomId) {
        return roomMapper.updateStateByIdClean(roomId);
    }

    @Override
    public List<Room> queryInfoByRoomOrderState(Integer roomOrderState) {
        return roomMapper.queryInfoByRoomOrderState(roomOrderState);
    }
}
